package com.tjetc.dao;

import com.tjetc.domain.Admin;
import com.tjetc.utils.Db;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;

import java.sql.SQLException;

public class AdminDao {
    private QueryRunner runner=new QueryRunner();
    public Admin log(String username, String password) throws SQLException {
        return Db.runner.query("select * from admin where username=? and password=?",new BeanHandler<>(Admin.class),username,password);
    }
}
